package com.ctshk.rpc.air.req.app;

import com.ctshk.common.model.PageReq;
import com.ctshk.rpc.air.req.AirBookingListDateReq;
import com.ctshk.rpc.air.req.AirBookingListReq;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

/**
 * @BelongsProject: ctshk-cloud
 * @BelongsPackage: com.ctshk.rpc.air.req.app
 * @Author: hef
 * @CreateTime: 2021-04-16 10:03
 * @Description: 描述
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "AirTicketsListReq",description = "机票列表请求对象")
public class AirTicketsListReq extends PageReq implements Serializable {

    private static final long serialVersionUID = 8575871273859585637L;
    /**
     * @Enum AirBookingTicketType
     */
    @ApiModelProperty(value = "机票类型")
    private Integer ticketType;

    @NotNull(message = "行程类型不能为空")
    @ApiModelProperty(value = "订单行程类型 1.单程 2往返 3 多程")
    private  Integer tripType;

    @NotNull(message = "客舱等级不能为空")
    @Size(min = 1,message = "客舱等级不能为空")
    @ApiModelProperty(value = "客艙級別")
    private List<Long> cabinClass;

    @ApiModelProperty(value = "航空公司Id")
    private List<Long> companyIds;

    @NotNull(message = "旅客类型不能为空")
    @Size(min = 1,message = "旅客类型不能为空")
    @ApiModelProperty(value = "旅客类型",required = true)
    private List<AirBookingListReq.TouristTypeValue> touristTypeIds;

    @ApiModelProperty(value = "是否直达 1直达 2中转")
    private Integer onWay;

    @ApiModelProperty(value = "是否雇佣 1是 2否")
    private Integer onHire;

    @ApiModelProperty(value = "起飞时间集合")
    private List<AirBookingListDateReq> airBookingListDateReqList;

    @NotNull(message = "出发日期不能为空")
    @ApiModelProperty(value = "出发日期" ,required = true)
    private LocalDate depDate;

    @NotNull(message = "默认当前日期")
    @ApiModelProperty(value = "默认当前日期",required =  true)
    private LocalDate currentTimes;

    @NotNull(message = "出发城市不能为空")
    @ApiModelProperty(value = "出发城市id",required =  true)
    private Long depCityId;

    @NotNull(message = "到达城市不能为空")
    @ApiModelProperty(value = "到达城市id",required =  true)
    private Long arrCityId;

    @ApiModelProperty(value = "第几程",required = true)
    private Integer rank;

    /**
     * 线上渠道id
     */
    @JsonIgnore
    private Long channelId;
}
